package cn.cvs.service.supplier;

import cn.cvs.pojo.Supplier;

import java.util.List;

public interface SupplierService {

	/**
	 * 增加供货商
	 * @param supplier
	 * @return
	 */
	public boolean add(Supplier supplier) throws Exception;

	/**
	 * 获取供应商列表
	 * @return
	 * @throws Exception
	 */
	public List<Supplier> getList() throws Exception;

	/**
	 * 通过供应商名称、编码获取供应商列表-模糊查询
	 * @param supName
	 * @param supCode
	 * @param currentPageNo
	 * @param pageSize
	 * @return
	 */
	public List<Supplier> getList(String supName, String supCode, int currentPageNo, int pageSize) throws Exception;


	/**
	 * 通过条件查询-供应商表记录数
	 * @param supName
	 * @param supCode
	 * @return
	 * @throws Exception
	 */
	public int getCount(String supName, String supCode) throws Exception;

	/**
	 * 根据id查询
	 * @param id
	 * @return
	 */
	public Supplier getById(Integer id) throws Exception;


	/**
	 * 修改供货商
	 * @param supplier
	 * @return
	 */
	public boolean update(Supplier supplier) throws Exception;

	/**
	 * 根据id删除供货商信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean deleteById(Integer id) throws Exception;
}
